non homogeneous recurrence relations